package ch.bfh.abcm.rems.sensors.tinkerforge;

public class TFSensorConfigDefinition {

    private static final int DEFAULT_PORT = 4223;
    private static final int DEFAULT_CALL_BACK_PERIOD = 50;

    private TFSensorType sensorType;
    private String uid;
    private String host;
    private long callBackPeriod;
    private int port;

    public TFSensorConfigDefinition(TFSensorType sensorType, String uid, String host) {
        this(sensorType, uid, host, DEFAULT_CALL_BACK_PERIOD, DEFAULT_PORT);
    }

    public TFSensorConfigDefinition(TFSensorType sensorType, String uid, String host, long callBackPeriod) {
        this(sensorType, uid, host, callBackPeriod, DEFAULT_PORT);
    }

    public TFSensorConfigDefinition(TFSensorType sensorType, String uid, String host, long callBackPeriod, int port) {
        this.sensorType = sensorType;
        this.uid = uid;
        this.host = host;
        this.callBackPeriod = callBackPeriod;
        this.port = port;

    }

    public static int getDefaultPort() {
        return DEFAULT_PORT;
    }

    public static int getDefaultCallBackPeriod() {
        return DEFAULT_CALL_BACK_PERIOD;
    }

    public TFSensorType getSensorType() {
        return sensorType;
    }

    public String getUid() {
        return uid;
    }

    public String getHost() {
        return host;
    }

    public long getCallBackPeriod() {
        return callBackPeriod;
    }

    public int getPort() {
        return port;
    }
    
    

}
